<template>
  <div>
    <div class="main">
      <div class="cover">
        <div class="imgbox">
          <img :src="imgurl" alt="">
        </div>
      </div>
      <div class="words">
        <h1>{{song.name}}</h1>
       <div v-html="words"></div>
      </div>
      <div class="same">

      </div>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      song:{},
      imgurl:'',
      words:''
    }
  },
  mounted(){
    this.$request({
       url:'/song/detail',
       params:{
         ids:this.$store.state.mid
       }
    }).then(success=>{
      this.song=success.data.songs[0]
      this.imgurl=this.song.al.picUrl
    })

  }
};
</script>

<style scoped>
@keyframes z {
  from{
    transform: rotateZ(0);
  }
  to{
    transform: rotateZ(360deg);
  }
}
h1{
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.main{
  display: flex;
  justify-content: space-between;
  height: 600px;
}
.cover{
  width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
 background-color: gold;
}

.words{
  width: 400px;
  height: 600px;
  background-color: green;
  text-align: center;
}
.same{
  width: 200px;
  height: 200px;
  background-color: greenyellow;
}
.imgbox{
  
  
  height: 250px;
  width: 250px;
  border-radius: 125px;
  text-align: center;
  background-color: grey;
  animation: z 8s infinite;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
  
}
.imgbox img{
  width: 250px;
  height: 250px;
  border-radius: 125px;
}
</style>